package com.example.drugs1.dao;

import com.example.drugs1.entities.Drugs;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface DrugsRepository extends CrudRepository<Drugs,Long> {



    @Override
     List<Drugs> findAll();

    Drugs findByDrugsId(long theId);

    @Query(value = "select * from Drugs where name LIKE %?% order by jg desc ",nativeQuery = true)
    List<Drugs> selectDrugs(String name);

}
